package com.bwie.parkdemo.mvvm.model.entity;

import com.bwie.lib_core.base.BaseEntity;
import com.google.gson.Gson;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门实体类
 * {\"departmentId\":47,\"departmentName\":\"技术部\",
 * \"departmentUserId\":47}
 * */
public class DepartmentEntity extends BaseEntity{

    private String values;

    private List<Object> departmentValues;

    public void setValues(String values) {
        this.values = values;
    }

    public List<Object> getDepartmentValues() {
        if (departmentValues == null){
            departmentValues = new ArrayList<>();
            departmentValues.add(new Gson().fromJson(values,Values.class));
        }
        return departmentValues;
    }

    public static class Values{
        public int departmentId;
        public int departmentUserId;
        public String departmentName;
    }

}
